//
//  UIView(TC).swift
//  SwiftProject
//
//  Created by HBY on 2021/7/10.
//

import Foundation
import UIKit

//给xib、storyBoard 右侧属性栏扩展可视属性
extension UIView{
    @IBInspectable var cornerRadius:CGFloat {
        get{
            return layer.cornerRadius
        }
        
        set{
            layer.cornerRadius = newValue
            layer.masksToBounds = true
        }
    }
    
    @IBInspectable var borderWidth:CGFloat {
        get{
            return layer.borderWidth
        }
        set{
            layer.borderWidth = newValue
        }
    }
    
    @IBInspectable var borderColor:UIColor {
        get{
            return UIColor.init(cgColor: layer.borderColor!)
        }
        
        set{
            layer.borderColor = newValue.cgColor
        }
    }
}
